from django.db import models

# Create your models here.


class CallCircuit(models.Model):
    '''
    业务线表
    '''
    Name = models.CharField(max_length=30)


class Host(models.Model):
    '''
    主机表
    '''
    Name = models.CharField(max_length=30)
    IP = models.GenericIPAddressField()
    Port = models.IntegerField()
    User = models.CharField(max_length=30)
    PassWd = models.CharField(max_length=50, null=True)
    SshKey = models.CharField(max_length=1024, null=True)
    callCircuit = models.ForeignKey("CallCircuit")

class UserInfo(models.Model):
    '''
    用户表
    '''
    UserName = models.CharField(max_length=30)
    PassWd = models.CharField(max_length=30)
    Email = models.EmailField(max_length=50)
    callCircuit = models.ManyToManyField("CallCircuit")


